package edu.pku.sei.modeler.figures.anchor;

import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.ReconnectRequest;

/**
 * AnchorPolicies can be installed on an anchor to help it decide
 * whether to accept a connecting object.
 *   
 * @author frankd@ifi.uio.no
 */
public interface AnchorPolicy {
	boolean acceptConnectionCreate(ConnectionAnchor anchor, CreateConnectionRequest request);
	boolean acceptConnectionComplete(ConnectionAnchor anchor, CreateConnectionRequest request);
	boolean acceptReconnectSource(ConnectionAnchor anchor, ReconnectRequest request);
	boolean acceptReconnectTarget(ConnectionAnchor anchor, ReconnectRequest request);
	
}